<template>
  <div>
    <button @click="add">{{ state.count }}</button>
    <button @click="add2">{{ num }}</button>
  </div>
</template>

<script setup>
import { reactive, ref } from 'vue';
let num = ref(100)
const state = reactive({
  count: 0
})
const add = function () {
  state.count++
}
const add2 = function () {
  num.value++
}
</script>

<style lang="css" scoped>

</style>